package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.CarCostCollectionMapper;
import com.ly.heart.service.ICarCostCollectionService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.CarCostCollectionEntity;

import javax.annotation.Resource;

/**
 * 车辆费用单多收款人信息Service业务层处理
 *
 * @author cxl
 * @date 2024-09-08
 */
@Service
public class CarCostCollectionServiceImpl extends ServiceImpl<CarCostCollectionMapper,CarCostCollectionEntity> implements ICarCostCollectionService {

    @Resource
    private CarCostCollectionMapper carCostCollectionMapper;

    /**
     * 查询车辆费用单多收款人信息
     *
     * @param id 车辆费用单多收款人信息ID
     * @return 车辆费用单多收款人信息
     */
    @Override
    public CarCostCollectionEntity selectCarCostCollectionEntityById(String id)
    {
        return carCostCollectionMapper.selectCarCostCollectionEntityById(id);
    }

    /**
     * 查询车辆费用单多收款人信息列表
     *
     * @param carCostCollectionEntity 车辆费用单多收款人信息
     * @return 车辆费用单多收款人信息
     */
    @Override
    public List<CarCostCollectionEntity> selectCarCostCollectionEntityList(CarCostCollectionEntity carCostCollectionEntity)
    {
        return carCostCollectionMapper.selectCarCostCollectionEntityList(carCostCollectionEntity);
    }

    /**
     * 新增车辆费用单多收款人信息
     *
     * @param carCostCollectionEntity 车辆费用单多收款人信息
     * @return 结果
     */
    @Override
    public int insertCarCostCollectionEntity(CarCostCollectionEntity carCostCollectionEntity)
    {
        carCostCollectionEntity.setCreateTime(DateUtils.getNowDate());
        return carCostCollectionMapper.insertCarCostCollectionEntity(carCostCollectionEntity);
    }

    /**
     * 修改车辆费用单多收款人信息
     *
     * @param carCostCollectionEntity 车辆费用单多收款人信息
     * @return 结果
     */
    @Override
    public int updateCarCostCollectionEntity(CarCostCollectionEntity carCostCollectionEntity)
    {
        carCostCollectionEntity.setUpdateTime(DateUtils.getNowDate());
        return carCostCollectionMapper.updateCarCostCollectionEntity(carCostCollectionEntity);
    }

    /**
     * 批量删除车辆费用单多收款人信息
     *
     * @param ids 需要删除的车辆费用单多收款人信息ID
     * @return 结果
     */
    @Override
    public int deleteCarCostCollectionEntityByIds(String[] ids)
    {
        return carCostCollectionMapper.deleteCarCostCollectionEntityByIds(ids);
    }

    /**
     * 删除车辆费用单多收款人信息信息
     *
     * @param id 车辆费用单多收款人信息ID
     * @return 结果
     */
    @Override
    public int deleteCarCostCollectionEntityById(String id)
    {
        return carCostCollectionMapper.deleteCarCostCollectionEntityById(id);
    }
}
